package 第五章多重循环;
import java.util.Scanner;
public class 银行 {
    public static void main(String[] args) {
        Scanner input =new Scanner(System.in);
        int s=0;
        while (true){
            for (int i=1;i<=3;i++){
                System.out.print("请输入密码：");

                String a=input.next();
                if ("111111".equals(a)){
                    break;
                }
                s++;
                 if (s==3){
                    System.out.println("请您取卡");
                    return;
                }
            }
            while (true){
                if (s==3){
                    System.out.println("请您取卡");
                    return;
                }
                System.out.print("请输入取钱金额：");
                int b= input.nextInt();
                if (b%100==0&&b<=1000){
                    break;
                }else {
                    System.out.println("您输入的金额不合法");
                }
            }
            System.out.println("交易成功！");
            return;
        }
    }
}
